import request from '@/utils/request'

// 举报
export function addReport(data) {
  return request({
    url: '/report/addReport',
    method: 'post',
    data
  })
}

// 获取文章内容举报列表
export function getArticleReportList(data) {
  return request({
    url: '/report/getArticleReportList',
    method: 'get',
    params: { username: data.username, _username: data._username, startTime1: data.startTime1,
      endTime1: data.endTime1, startTime2: data.startTime2, endTime2: data.endTime2,
      pageIndex: data.pageIndex }
  })
}

// 获取文章评论举报列表
export function getArticleCommentReportList(data) {
  return request({
    url: '/report/getArticleCommentReportList',
    method: 'get',
    params: { username: data.username, _username: data._username, startTime1: data.startTime1,
      endTime1: data.endTime1, startTime2: data.startTime2, endTime2: data.endTime2,
      pageIndex: data.pageIndex }
  })
}
// 获取问题举报列表
export function getQuestionCommentReportList(data) {
  return request({
    url: '/report/getQuestionCommentReportList',
    method: 'get',
    params: { username: data.username, _username: data._username, startTime1: data.startTime1,
      endTime1: data.endTime1, startTime2: data.startTime2, endTime2: data.endTime2,
      pageIndex: data.pageIndex }
  })
}
// 获取问题回答举报列表
export function getQuestionAnswerReportList(data) {
  return request({
    url: '/report/getQuestionAnswerReportList',
    method: 'get',
    params: { username: data.username, _username: data._username, startTime1: data.startTime1,
      endTime1: data.endTime1, startTime2: data.startTime2, endTime2: data.endTime2,
      pageIndex: data.pageIndex }
  })
}
// 获取问题回答评论举报列表
export function getQuestionAnswerReplyReportList(data) {
  return request({
    url: '/report/getQuestionAnswerReplyReportList',
    method: 'get',
    params: { username: data.username, _username: data._username, startTime1: data.startTime1,
      endTime1: data.endTime1, startTime2: data.startTime2, endTime2: data.endTime2,
      pageIndex: data.pageIndex }
  })
}

// 处理举报
export function treatment(data) {
  return request({
    url: '/report/treatment',
    method: 'get',
    params: { id: data.id }
  })
}

